package com.service.impl;

import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;

import com.model.Customer;
import com.util.ReadXlsUtil;

public class CustomerXls {
	private static Customer customer = null;

	public static Customer read(HSSFRow hssfRow) {
		customer = new Customer();
		HSSFCell no = hssfRow.getCell(0);
		HSSFCell name = hssfRow.getCell(1);
		HSSFCell tele = hssfRow.getCell(2);
		HSSFCell address = hssfRow.getCell(3);
		customer.setCustomerNo(ReadXlsUtil.getValue(no));
		customer.setCustomerName(ReadXlsUtil.getValue(name));
		customer.setTelephone(ReadXlsUtil.getValue(tele));
		customer.setAddress(ReadXlsUtil.getValue(address));
		return customer;
	}
}
